<template>
	<view class="row-box " v-if="staffsEarn">

		<view class="tab-item fcc" @click="$fn.toPages('/pages/commission/income?type=1')">
			<view class="fc-9 flex align-items-center">
				<text>累计收益(元)</text>
				<p-help></p-help>
			</view>
			<view class="flex align-items-center mt-10">
				<text class="fc-3 fw-6 val">{{staffsEarn.earnings}}</text>
				<text class="iconfont fc-9 fcc fs-sm ml-10 ">
					&#xe687;
				</text>
			</view>
		</view>

		<view class="tab-item fcc " @click="$fn.toPages('/pages/commission/withdrawalRecord')">
			<view class="fc-9">
				已提现(元)
			</view>
			<view class="flex mt-10">
				<text class="fc-3 fw-6 val">{{staffsEarn.withdrawn}}</text>
				<text class="iconfont fc-9 fcc fs-sm ml-10 ">
					&#xe687;
				</text>
			</view>
		</view>
		<view class="tab-item fcc" @click="$fn.toPages('/pages/commission/income?type=2')">
			<view class="fc-9 flex align-items-center">
				<text>待入账(元)</text>
				<p-help></p-help>
			</view>
			<view class="flex mt-10">
				<text class="fc-3 fw-6 val">{{staffsEarn.pending_deposit}}</text>
				<text class="iconfont fc-9 fcc fs-sm ml-10 ">
					&#xe687;
				</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		apiGetStaffsEarn,
		apiApply,
		apiApplyLog,
		apiEarnList
	} from '@/api/commission.js'
	export default {
		data() {
			return {
				staffsEarn: null,
			}
		},
		created() {
			this.getStoreList()
		},
		methods: {
			async getStoreList() {
				let res = await apiGetStaffsEarn()
				this.staffsEarn = res
			},
		}
	}
</script>

<style lang="scss" scoped>
	.store-logo {
		width: 48rpx;
		height: 48rpx;
	}
</style>